package com.itheima.sh.exception;

import com.itheima.sh.response.ResponseResult;

/**
 * @author Dqh
 * @create 2020-09-17 22:24
 * @desc 主动抛出的异常
 **/
public class BusinessException extends RuntimeException {

    private ResponseResult responseResult;  //保存错误信息,统一响应

    public BusinessException(ResponseResult responseResult) {
        this.responseResult = responseResult;
    }
    // 提供get方法即可
    public ResponseResult getResponseResult() {
        return responseResult;
    }
}
